<template>
  <div class="goodsDetails">
    <!-- 引入头部组件 并修改内容 -->
    <div class="header_box">
      <header1View>
        <template v-slot:left>
          <div class="title_left">
            <van-icon name="arrow-left"
                      class="icon"
                      @click="back" />
          </div>
        </template>
        <template v-slot:center>
          <div class="title_center">
            交易快照
          </div>
        </template>
      </header1View>
    </div>
    <!-- 引入商品详情组件 -->
    <div class="details">
      <GoodsDetailsComp :goodsList="imgList"></GoodsDetailsComp>
    </div>
  </div>
</template>

<script>
import header1View from '../../components/OrdersComponents/header1View.vue'
import GoodsDetailsComp from '../../components/OrdersComponents/GoodsDetailsComp.vue'
export default {
  data () {
    return {
      imgList: {},
    }
  },
  created () {
    this.imgList = JSON.parse(this.$route.query.imgList)
    console.log(this.imgList);
  },
  components: {
    header1View,
    GoodsDetailsComp
  },
  methods: {
    back () {
      this.$router.go(-1)
    }
  }
}
</script>

<style scoped lang="scss">
.header_box {
  position: fixed;
}
.details {
  padding-top: 20px;
}
.goodsDetails {
  width: 100%;
  min-height: 100vh;
  background-color: #f5f5f5;
  padding-bottom: 5px;
}
.title_center {
  width: 100px;
  margin: 0 auto;
  align-items: center;
}
.icon {
  position: absolute;
  left: 10px;
  top: 50%;
  margin-top: -8px;
}
</style>